package com.hunttown.mes.manage.controller.common;

import com.hunttown.mes.common.keys.KeyConstants;
import com.hunttown.mes.common.utils.CookieUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import javax.servlet.http.HttpServletRequest;

/**
 * 获取用户基础信息
 * created by wangjunfu on 2018/11/5
 */
public class AdminBaseClass {
    private final static Logger logger = LoggerFactory.getLogger(AdminBaseClass.class);

    public static String getPin(HttpServletRequest request) {
        return CookieUtils.getCookieByName(request, KeyConstants.ADMIN_COOKIE);
    }

    public static String getNick(HttpServletRequest request) {
        return CookieUtils.getCookieByName(request, KeyConstants.ADMIN_COOKIE_NICK);
    }
}